<template>
  <view>
    <g-navbar title="测试标题测试标题" :bgColor="`rgba(255,0,0,${opacity})`" />
    <view
      class="w-170 h-182 rounded-12 bg-fff box-shadow-[0_0_10rpx_rgba(0,0,0,.5)] flex items-center justify-center mx-auto"
      :style="{ background: `url('${CDN_URL}/logo.png')` }"
      @click="test"
    >
      {{ opacity }}
    </view>
    {{ CDN_URL }}{{ height }}
  </view>
</template>
<script setup>
import { onPageScroll } from "@dcloudio/uni-app";
const { CDN_URL } = useGlobalVal();
const { scrollFn, opacity } = useGetNavbarOpacity();
const { height } = useGetNavInfo();
onPageScroll(scrollFn);
</script>

<style lang="scss" scoped>
.aaa {
  background: url("/logo.png");
}
</style>
